/**
 * Created by Administrator on 2019/4/2.
 *
 * demo1.js
 */

//输入限制为1-99999999.99
function filterFloatFn(){
    $(".tree_table_input").keyup(function(e){
        if(e.keyCode == 37 || e.keyCode == 38 || e.keyCode == 39 || e.keyCode == 40){return false;}
        var val = $(this).val();
        //开头
        var start = /^\d{0,9}/;
        //结尾
        var end = /\..*$/;
        //去除空格
        $(this).val($(this).val().replace(/\s/g,''));
        var num1 = (JSON.stringify(val.match(start)[0])+(val.match(end)?val.match(end)[0].substr(0,3):'')).replace(/"/g,'');
        //console.log(num1);
        $(this).val(num1);
    });
}